Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODShape


WriteShape

The WriteShape method writes this shape to the specified storage unit.

void WriteShape (in ODStorageUnit storageUnit);
storageUnit
A reference to the storage unit where the shape data is to be written.
DISCUSSION
Before calling this method, you must focus the storage unit to the property where the shape data is to be written.

If the shape can be represented as a polygon, it is written as such to the value of type kODPolygon in the focused property, replacing any polygon that was previously stored in that value or creating the value if it doesn't already exist.

On the Mac OS platform, a shape can always be written as a polygon, possibly after being converted from a nonpolygonal representation. On other platforms, a shape that cannot be represented as a polygon may be written in a platform-specific form to the value of the currently focused property with the appropriate platform-specific value type, replacing any shape data that was previously stored in that value or creating the value if it doesn't already exist.

EXCEPTIONS
kODErrOutOfMemory
There is not enough memory to write the shape's data to the storage unit.
kODErrUnfocusedStorageUnit
This storage unit is not focused on a property or a value.
SEE ALSO
The ODShape::ReadShape method (page 646).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help